package com.dt.app.api.shopping.service.impl;

import com.dt.app.api.shopping.mapper.OrderSalesMapper;
import com.dt.app.api.shopping.service.IOrderSalesService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.dt.app.modules.shopping.entities.OrderSales;
import com.dt.app.modules.shopping.vo.OrderSalesBean;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 鸿源塔基
 * @since 2023-02-27
 */
@Service
public class OrderSalesServiceImpl extends ServiceImpl<OrderSalesMapper, OrderSales> implements IOrderSalesService {
    public OrderSales getEntity(OrderSalesBean bean){
        OrderSales entity = new OrderSales();
        //BeanUtils.copyProperties(bean,entity);
        entity.setOrderSalesId(bean.getOrderSalesId());
        entity.setSysCompanyId(bean.getSysCompanyId());
        entity.setSysDepartmentId(bean.getSysDepartmentId());
        entity.setHyUserId(bean.getHyUserId());
        entity.setSellersId(bean.getSellersId());
        entity.setSellerHeadquartersId(bean.getSellerHeadquartersId());
        entity.setSaleUserId(bean.getSaleUserId());
        entity.setCountryId(bean.getCountryId());
        entity.setPaymentMethodId(bean.getPaymentMethodId());
        entity.setPaymentMethodName(bean.getPaymentMethodName());
        entity.setPaymentTypesKey(bean.getPaymentTypesKey());
        entity.setOrderNo(bean.getOrderNo());
        entity.setOrderType(bean.getOrderType());
        entity.setBuyType(bean.getBuyType());
        entity.setInvoiceTitle(bean.getInvoiceTitle());
        entity.setNeedBilling(bean.getNeedBilling());
        entity.setBillingMsg(bean.getBillingMsg());
        entity.setUserAddressId(bean.getUserAddressId());
        entity.setReceiveUser(bean.getReceiveUser());
        entity.setReceiveCountry(bean.getReceiveCountry());
        entity.setReceiveState(bean.getReceiveState());
        entity.setReceiveCity(bean.getReceiveCity());
        entity.setReceiveArea(bean.getReceiveArea());
        entity.setReceiveZip(bean.getReceiveZip());
        entity.setReceiveTelephone(bean.getReceiveTelephone());
        entity.setReceiveAddress(bean.getReceiveAddress());
        entity.setReceiveEmail(bean.getReceiveEmail());
        entity.setReceiveTime(bean.getReceiveTime());
        entity.setLogisCode(bean.getLogisCode());
        entity.setLogisModelToId(bean.getLogisModelToId());
        entity.setLogisSendTime(bean.getLogisSendTime());
        entity.setLogisSnameMsg(bean.getLogisSnameMsg());
        entity.setLogisticsCost(bean.getLogisticsCost());
        entity.setShippingTotalCost(bean.getShippingTotalCost());
        entity.setSupplyValue(bean.getSupplyValue());
        entity.setTaxAmt(bean.getTaxAmt());
        entity.setTaxApplied(bean.getTaxApplied());
        entity.setTotal(bean.getTotal());
        entity.setCouponDiscountAmt(bean.getCouponDiscountAmt());
        entity.setGiftCertficateAmt(bean.getGiftCertficateAmt());
        entity.setGoldPayCount(bean.getGoldPayCount());
        entity.setGoldPayMoney(bean.getGoldPayMoney());
        entity.setIntegralPayCount(bean.getIntegralPayCount());
        entity.setIntegralPayMoney(bean.getIntegralPayMoney());
        entity.setPromotionMsg(bean.getPromotionMsg());
        entity.setSaveMoneyTotal(bean.getSaveMoneyTotal());
        entity.setSubtotal(bean.getSubtotal());
        entity.setOrderStatus(bean.getOrderStatus());
        entity.setPaymentStatus(bean.getPaymentStatus());
        entity.setShippingStatus(bean.getShippingStatus());
        entity.setItemsCount(bean.getItemsCount());
        entity.setNotes(bean.getNotes());
        entity.setPaymentTime(bean.getPaymentTime());
        entity.setCreateTime(bean.getCreateTime());
        entity.setCreateBy(bean.getCreateBy());
        entity.setUpdateTime(bean.getUpdateTime());
        entity.setUpdateBy(bean.getUpdateBy());
        entity.setCouponId(bean.getCouponId());
        entity.setCouponType(bean.getCouponType());
        entity.setSellerOrderBillingId(bean.getSellerOrderBillingId());
        entity.setGdState(bean.getGdState());
        entity.setDeleted(bean.getDeleted());
        return entity;
    }
    public OrderSalesBean getBean(OrderSales entity){
        OrderSalesBean bean = new OrderSalesBean();
        bean.setOrderSalesId(entity.getOrderSalesId());
        bean.setSysCompanyId(entity.getSysCompanyId());
        bean.setSysDepartmentId(entity.getSysDepartmentId());
        bean.setHyUserId(entity.getHyUserId());
        bean.setSellersId(entity.getSellersId());
        bean.setSellerHeadquartersId(entity.getSellerHeadquartersId());
        bean.setSaleUserId(entity.getSaleUserId());
        bean.setCountryId(entity.getCountryId());
        bean.setPaymentMethodId(entity.getPaymentMethodId());
        bean.setPaymentMethodName(entity.getPaymentMethodName());
        bean.setPaymentTypesKey(entity.getPaymentTypesKey());
        bean.setOrderNo(entity.getOrderNo());
        bean.setOrderType(entity.getOrderType());
        bean.setBuyType(entity.getBuyType());
        bean.setInvoiceTitle(entity.getInvoiceTitle());
        bean.setNeedBilling(entity.getNeedBilling());
        bean.setBillingMsg(entity.getBillingMsg());
        bean.setUserAddressId(entity.getUserAddressId());
        bean.setReceiveUser(entity.getReceiveUser());
        bean.setReceiveCountry(entity.getReceiveCountry());
        bean.setReceiveState(entity.getReceiveState());
        bean.setReceiveCity(entity.getReceiveCity());
        bean.setReceiveArea(entity.getReceiveArea());
        bean.setReceiveZip(entity.getReceiveZip());
        bean.setReceiveTelephone(entity.getReceiveTelephone());
        bean.setReceiveAddress(entity.getReceiveAddress());
        bean.setReceiveEmail(entity.getReceiveEmail());
        bean.setReceiveTime(entity.getReceiveTime());
        bean.setLogisCode(entity.getLogisCode());
        bean.setLogisModelToId(entity.getLogisModelToId());
        bean.setLogisSendTime(entity.getLogisSendTime());
        bean.setLogisSnameMsg(entity.getLogisSnameMsg());
        bean.setLogisticsCost(entity.getLogisticsCost());
        bean.setShippingTotalCost(entity.getShippingTotalCost());
        bean.setSupplyValue(entity.getSupplyValue());
        bean.setTaxAmt(entity.getTaxAmt());
        bean.setTaxApplied(entity.getTaxApplied());
        bean.setTotal(entity.getTotal());
        bean.setCouponDiscountAmt(entity.getCouponDiscountAmt());
        bean.setGiftCertficateAmt(entity.getGiftCertficateAmt());
        bean.setGoldPayCount(entity.getGoldPayCount());
        bean.setGoldPayMoney(entity.getGoldPayMoney());
        bean.setIntegralPayCount(entity.getIntegralPayCount());
        bean.setIntegralPayMoney(entity.getIntegralPayMoney());
        bean.setPromotionMsg(entity.getPromotionMsg());
        bean.setSaveMoneyTotal(entity.getSaveMoneyTotal());
        bean.setSubtotal(entity.getSubtotal());
        bean.setOrderStatus(entity.getOrderStatus());
        bean.setPaymentStatus(entity.getPaymentStatus());
        bean.setShippingStatus(entity.getShippingStatus());
        bean.setItemsCount(entity.getItemsCount());
        bean.setNotes(entity.getNotes());
        bean.setPaymentTime(entity.getPaymentTime());
        bean.setCreateTime(entity.getCreateTime());
        bean.setCreateBy(entity.getCreateBy());
        bean.setUpdateTime(entity.getUpdateTime());
        bean.setUpdateBy(entity.getUpdateBy());
        bean.setCouponId(entity.getCouponId());
        bean.setCouponType(entity.getCouponType());
        bean.setSellerOrderBillingId(entity.getSellerOrderBillingId());
        bean.setGdState(entity.getGdState());
        bean.setDeleted(entity.getDeleted());
        return bean;
    }
}
